-
Notifications
You must be signed in to change notification settings - Fork 16
test(crashtracking): add minimal LD preload test for crashtracker collector #1428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1428 +/- ##
==========================================
- Coverage 71.32% 71.25% -0.08%
==========================================
Files 416 416
Lines 66781 66850 +69
==========================================
+ Hits 47631 47633 +2
- Misses 19150 19217 +67
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2026-01-15 21:29:38 Comparing candidate commit 6fed733 in PR branch Found 6 performance improvements and 5 performance regressions! Performance is the same for 46 metrics, 2 unstable metrics. scenario:benching serializing traces from their internal representation to msgpack
scenario:credit_card/is_card_number/ 3782-8224-6310-005
scenario:credit_card/is_card_number/378282246310005
scenario:credit_card/is_card_number/x371413321323331
scenario:credit_card/is_card_number_no_luhn/x371413321323331
scenario:normalization/normalize_name/normalize_name/good
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
c9a32e0 to
5d2087f
Compare
bin_tests/preload/preload.c
Outdated
| } | ||
|
|
||
| void *ptr = real_malloc(size); | ||
| log_line("malloc", size, ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a global atomic that controls whether to log, enabled when the signal handler is active disabled otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something similar with static __thread int dd_is_collector = 0; on line 26. This gets called on collector init
e2ed49c to
677bb4f
Compare
c8ebe5f to
93c78fb
Compare
9437e20 to
ff6feed
Compare
ff6feed to
5cf9c7d
Compare
gleocadie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start :)
Few requests/questions.
One thing we should improve is to have it for multiple situations in the collector.
At first we can focus on that it's working in in process symbols resolution (if there is a test for that, we should expect that the test will fail)
and the rest should be mark as expect to success.
Did you check that it's actually working ?
40e549b to
301c04f
Compare
301c04f to
6fed733
Compare

What does this PR do?
Motivation
We want to validate all uses of non-signal-safe functions in the handler.
How to test the change?
You can run the
test_collector_no_allocations_stacktrace_modestest. You can also add allocations in the signal hander path and observe the test behavior